fix: add return_ce_loss attribute to _DummySeq test stub#4683
Closed
Copilot wants to merge 2 commits into
Closed
Conversation
The `inputs_maker.py` `__need_ce_loss` function accesses `seq.return_ce_loss` but the `_DummySeq` stub in the test file was missing this attribute, causing 3 test failures: - test_single_forward_multimodal_long_context_stays_normal_prefill_for_spec_decoding - test_spec_decoding_text_turn_ignores_previous_multimodal_chunk_limit - test_long_context_final_chunk_preserves_multimodal_flag_for_spec_decoding
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job unit_test
fix: add Jun 16, 2026
return_ce_loss to _DummySeq test stub
Copilot
AI
changed the title
fix: add
Fix unit_test regression in test_inputs_maker dummy sequence
Jun 16, 2026
return_ce_loss to _DummySeq test stub
Copilot
AI
changed the title
Fix unit_test regression in test_inputs_maker dummy sequence
fix: add Jun 16, 2026
return_ce_loss attribute to _DummySeq test stub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
get_pplfeature added a__need_ce_losshelper ininputs_maker.pythat readsseq.return_ce_losson every sequence in the running list. The_DummySeqstub used intests/pytorch/engine/test_inputs_maker.pywas never updated to include this attribute, causing 3 tests to fail withAttributeError.Modification
self.return_ce_loss = Falseto_DummySeq.__init__alongside the existingreturn_logitsandreturn_routed_expertsstub attributes.BC-breaking (Optional)
N/A — test-only change.
Use cases (Optional)
N/A
Checklist